package com.senta.elasticsearch.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.senta.elasticsearch.entity.BillingItemDis;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author anyang
 * @since 2019-11-19
 */
public interface BillingItemDisMapper extends BaseMapper<BillingItemDis> {
    /**
     * 获取当最小主键值
     * @return
     */
    @Select("SELECT MIN(CAST(bid.pk AS SIGNED INTEGER)) FROM billing_item_dis bid")
     Integer getMinPrimaryKey();

    /**
     * 获取当前最大主键值
     * @return
     */
    @Select("SELECT MAX(CAST(bid.pk AS SIGNED INTEGER)) FROM billing_item_dis bid")
     Integer getMaxPrimaryKey();


}
